package com.hantek.lms.login.service.impl;

import com.dz.core.util.MD5Util;
import com.google.common.base.Strings;
import com.hantek.lms.login.dto.UserDto;
import com.hantek.lms.login.model.DomainUser;
import com.hantek.lms.login.mapper.DomainUserMapper;
import com.hantek.lms.login.service.IDomainUserService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lether
 * @since 2017-11-16
 */
@Service
public class DomainUserServiceImpl implements IDomainUserService {

    @Autowired
    private DomainUserMapper userMapper;

    @Override
    public DomainUser findUser(UserDto userDto) {

        DomainUser domainUser = new DomainUser();
        domainUser.setUsername(userDto.getName());
        domainUser.setPassword(userDto.getPwd());

        return userMapper.selectOne(domainUser);
    }
}
